<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            font-family: monospace;
        }
    </style>
    <script>
        document.write("格式一：<br>")
        var i=1;
        while(i<=9){
            var j=1;
            while(j<=i){

                document.write(i+"*"+j+"="+i*j+(i*j<10?"&nbsp;&nbsp;":"&nbsp;"));
                j++;
            }
            i++;
            document.write("<br>");
        }
        document.write("<br>");

        document.write("格式二：<br>")
        var i=9;
        while(i>=1){
            var j=1;
            while(j<=i){
                document.write(i+"*"+j+"="+i*j+(i*j<10?"&nbsp;&nbsp;":"&nbsp;"));
                j++
            }
            i--;
            document.write("<br>");

        }
        document.write("<br>");

        document.write("格式三：<br>")
        var i=1;
        while(i<=9){
            var j=1;
            while(j<=9-i){
                document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                j++;
            }
            var k=1;
            while(k<=i){
                document.write(i+"*"+k+"="+i*k+(i*k<10?"&nbsp;&nbsp;":"&nbsp;"));
                k++;
            }
            document.write("<br>");
            i++;
        }

        document.write("<br>");

        document.write("格式四：<br>")
        var i=9;
        while(i>=1){
            var j=1;
            while(j<=9-i){
                document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                j++;
            }
            var k=i;
            while(k>=1){
                document.write(i+"*"+k+"="+i*k+(i*k<10?"&nbsp;&nbsp;":"&nbsp;"));
                k--;
            }
            document.write("<br>");
            i--;
        }

    </script>
</head>
<body>
    
</body>
</html>